package com.rent.message.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("chat_message")
@ApiModel("聊天消息实体类")
public class ChatMessage implements Serializable {

    @TableId
    @ApiModelProperty("主键ID")
    private Long id;

    @TableField("post_user_id")
    @ApiModelProperty("发布者ID")
    private Long postUserId;

    @TableField("get_user_id")
    @ApiModelProperty("接收者ID")
    private Long getUserId;

    @ApiModelProperty("消息内容")
    private String content;

    @ApiModelProperty("图片")
    private String picture;

    @TableField("is_read")
    @ApiModelProperty("是否已读")
    private Integer isRead;

    @ApiModelProperty("发送时间")
    private Date created;

}
